-
Notifications
You must be signed in to change notification settings - Fork 55
fix: replace NumberAnimation with XAnimator in notification bubble #1134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The change replaces NumberAnimation with XAnimator for the notification bubble transition animation. XAnimator is more efficient for animating x-position changes as it's specifically designed for this purpose and can leverage hardware acceleration. This improves performance and makes the animation smoother, especially when multiple notifications appear in quick succession. The duration and easing type remain the same to maintain consistent visual behavior. fix: 在通知气泡中用 XAnimator 替换 NumberAnimation 此次更改将通知气泡的过渡动画从 NumberAnimation 替换为 XAnimator。 XAnimator 专门用于处理 x 轴位置变化的动画,能更好地利用硬件加速,从而提 高性能并使动画更加流畅,特别是在快速连续出现多个通知时。保持相同的持续时 间和缓动类型以确保视觉行为一致。 pms: BUG-297317
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We encountered an error and are unable to review this PR. We have been notified and are working to fix it.
You can try again by commenting this pull request with @sourcery-ai review, or contact us for help.
Reviewer's GuideReplaces NumberAnimation with XAnimator for the notification bubble’s x-position transition to leverage hardware acceleration, improving performance and smoothing animations while retaining existing duration and easing settings. Sequence Diagram: Notification Item X-Animation Method ChangesequenceDiagram
participant TransitionLogic as "Transition (addTrans)"
participant ItemToAnimate as "addTrans.ViewTransition.item"
participant OldAnimator as "NumberAnimation"
participant NewAnimator as "XAnimator"
TransitionLogic->>ItemToAnimate: Start enter animation (x-movement)
alt Previous Method (Software Animation)
TransitionLogic->>OldAnimator: Use for animating 'x' property
OldAnimator->>ItemToAnimate: Set 'x' over time based on 'properties', 'from', 'duration', 'easing.type'
else New Method (Hardware-Accelerated Animation)
TransitionLogic->>NewAnimator: Use for animating 'x' property (via target)
NewAnimator->>ItemToAnimate: Set 'x' over time based on 'target', 'from', 'duration', 'easing.type'
end
Class Diagram: Animator Component Replacement in Notification TransitionclassDiagram
class NumberAnimation {
<<Removed Component in Transition>>
+properties: String = "x"
+from: String = "addTrans.ViewTransition.item.width"
+duration: Int = 600
+"easing.type": String = "Easing.OutExpo"
}
class XAnimator {
<<Added Component in Transition>>
+target: String = "addTrans.ViewTransition.item"
+from: String = "addTrans.ViewTransition.item.width"
+duration: Int = 600
+"easing.type": String = "Easing.OutExpo"
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, mhduiy The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/forcemerge |
|
This pr force merged! (status: blocked) |
The change replaces NumberAnimation with XAnimator for the notification
bubble transition animation. XAnimator is more efficient for animating
x-position changes as it's specifically designed for this purpose and
can leverage hardware acceleration. This improves performance and makes
the animation smoother, especially when multiple notifications appear
in quick succession. The duration and easing type remain the same to
maintain consistent visual behavior.
fix: 在通知气泡中用 XAnimator 替换 NumberAnimation
此次更改将通知气泡的过渡动画从 NumberAnimation 替换为 XAnimator。
XAnimator 专门用于处理 x 轴位置变化的动画,能更好地利用硬件加速,从而提
高性能并使动画更加流畅,特别是在快速连续出现多个通知时。保持相同的持续时
间和缓动类型以确保视觉行为一致。
pms: BUG-297317